function Huddle () { // class for handling general application settings, holding variables

  // holds user/pass for use in each API request, set by login and not changed unless login screen displayed again
  this.username = "";
  this.password = "";
  
  this.defaultWidth = 380;
  this.defaultHeight = 320;
  
  this.minWidth = 380;
  this.minHeight = 320;

  // functions to set user/pass variables from login
  this.setUsername = function(user) { this.username = user;};
  this.setPassword = function(pass) { this.password = pass;};
  this.setAuthentication = function(user,pass) {
  
    this.username = user;
    this.password = pass;
    
  };

  // returns whether or not credentials are set
  this.isAuth = function() { 

    if ((this.username!="") && (this.password!="")) {
    
      return 1;
      
    } else {
    
      return 0;
      
    }

  };

  // returns user/pass on request
  this.getUsername = function() { return this.username; };
  this.getPassword = function() { return this.password; };
  
  // wipes if they fail
  this.wipe = function() {
  
    this.username = "";
    this.password = "";
    
  };  
  
  // close the application gently
  this.closeApp = function() {
  
    var closing = new air.Event(air.Event.CLOSING, true, true);
    
    window.nativeWindow.dispatchEvent(closing); // dispach closing event
    
    if(!closing.isDefaultPrevented()) { // when nothing else wants to complete closing events
    
        nativeWindow.close(); // close window
    
    } else {
    
      msgs.setError(1, "default exit prohibited", "Unable to exit the application");
    
    }
  
  }

}